package com.lmonkey.servlet.my;

import com.lmonkey.servic.COMMENTDao;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet("/shangc/doupdatecomment")
public class DoUpdateComment extends HttpServlet {
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        //设置字符集
        request.setCharacterEncoding("UTF-8");
        response.setContentType("text/html;charset=utf-8");
        //获取参数
        String coid = request.getParameter("cid");
        String desc = request.getParameter("desc");

        //进行修改
        COMMENTDao.updateByid(desc,coid);

        response.sendRedirect("myprodselect");
    }
}
